package com.aliyun.heiyu.powermaster.server.dao;


import com.aliyun.heiyu.powermaster.server.dao.entity.DeviceCommonEntity;
import com.aliyun.heiyu.powermaster.server.dao.entity.DeviceIPDeviceIdDTO;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface DeviceCommonDao extends DeviceSpecDao {
    List<DeviceCommonEntity> findAllEntity();

    DeviceCommonEntity findOneEntity(String deviceId);

    DeviceCommonEntity findByIp(String ip);

    DeviceCommonEntity findByLocatedId(String locatedId);

    int getCountOfCabinet(String id);

    int getTotalCountByCondition(String cabinetSn, String condition, Object[] types, String business, String usageStatus, String locationId);

    List<DeviceCommonEntity> findByCondition(String cabinetSn, String condition, Object[] types, String business, String status, int start, int size,String locationId);

    List<DeviceCommonEntity> findByCondition(String cabinetSn, String condition, Object[] types, String business, String status,String locationId);

    List<DeviceCommonEntity> findByCabinet(String cabinetSn);

    boolean modifyUsageStatus(String deviceId, String usageStatus) throws SQLException;

    List<DeviceCommonEntity> findByType(String type);

    List<Map<String,String>> findByTypes(String types);

    Map<String, String> usedServerAmount();

    Map<String, String> totalServerAmount();

    List<DeviceIPDeviceIdDTO> selectServerIp();
}
